package com.zzwtec.basedata.services;

import java.util.List;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zzwtec.ResultObject;
import com.zzwtec.SimpleResult;
import com.zzwtec.basedata.bean.Area;

/**
 * @FeignClient需要指向接口实现者的应用名比如(zzwtec-basedata)
 * @author  草原狼
 * 2017年7月5日
 */
@FeignClient("zzwtec-basedata")
public interface AreaService {

	/**
	 * 添加区域
	 * 
	 * @param bean
	 * @return
	 */
	@RequestMapping(value = "add", method = RequestMethod.POST)
	public SimpleResult addArea(@RequestBody Area bean);

	/**
	 * 按id删除区域
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "remove", method = RequestMethod.POST)
	public SimpleResult removeArea(@RequestBody String id);

	/**
	 * 
	 * @param bean
	 * @return
	 */
	@RequestMapping(value = "modify", method = RequestMethod.POST)
	public SimpleResult modifyArea(@RequestBody Area bean);

	/**
	 * 查询所有区域
	 * 
	 * @return
	 */
	@RequestMapping(value = "queryAllArea", method = RequestMethod.GET)
	public ResultObject<List<Area>> queryAllArea();

	/**
	 * 根据id查询区域
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "queryAreaById", method = RequestMethod.POST)
	public ResultObject<Area> queryAreaById(@RequestBody String id);

}
